package advance

import (
	"context"
	"fmt"

	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo"
)

// 在关系型数据库中，我们经常用count关键字统计数量

func Count(mongo *mongo.Database, ctx context.Context) {
	num, err := mongo.Collection("test").CountDocuments(ctx, bson.M{})
	fmt.Println(err)
	fmt.Println(num)
}
